home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / pdcurs21.zip / PORTABLE.ZIP / CLEAROK.C < prev    next >
Text File  |  1992-11-21  |  1KB  |  49 lines

  1. #define        CURSES_LIBRARY  1
  2. #include <curses.h>
  3. #undef clearok
  4.  
  5. #ifndef        NDEBUG
  6. char *rcsid_clearok = "$Header: c:/curses/portable/RCS/clearok.c%v 2.0 1992/11/15 03:28:47 MH Rel $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   clearok()    - enable screen clearing
  15.  
  16.   X/Open Description:
  17.        If bf is TRUE, the next call to wrefresh() with this window will
  18.        clear the screen completely and redraw the entire screen.
  19.  
  20.   X/Open Return Value:
  21.        The clearok() function returns OK on success and ERR on error.
  22.  
  23.   X/Open Errors:
  24.        No errors are defined for this function.
  25.  
  26.   PDCurses Errors:
  27.        It is an error to call this function with a NULL window pointer.
  28.  
  29.   Portability:
  30.        PDCurses        int clearok( WINDOW* win, bool flag );
  31.        X/Open Dec '88  int clearok( WINDOW* win, bool bf );
  32.        BSD Curses
  33.        SYS V Curses    int clearok( WINDOW* win, bool bf );
  34.  
  35. **man-end**********************************************************************/
  36.  
  37. int    clearok(WINDOW *win, bool flag)
  38. {
  39.        if (win == (WINDOW *)NULL)
  40.                return( ERR );
  41.  
  42.        if (win == curscr)
  43.                tmpwin->_clear = flag;
  44.        else
  45.                win->_clear = flag;
  46.  
  47.        return( OK );
  48. }
  49.